package p270jp.pxv.android.activity;

import android.os.Bundle;
import android.view.MenuItem;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;
import androidx.fragment.app.BackStackRecord;
import p014ae.AbstractActivityC0189y3;
import p047bg.C1124a;
import p134ei.AnalyticsScreenName;
import p134ei.PixivAnalytics;
import p165fo.Subscribe;
import p270jp.pxv.android.R;
import p270jp.pxv.android.event.ShowWebViewEvent;
import p270jp.pxv.android.fragment.SettingFragment;
import p314lg.ActivitySettingsBinding;
import p325m0.MutabilityOwnership;

/* compiled from: SettingActivity.kt */
/* renamed from: jp.pxv.android.activity.SettingActivity */
/* loaded from: classes2.dex */
public final class SettingActivity extends AbstractActivityC0189y3 {
    @Override // p270jp.pxv.android.activity.BaseActivity, androidx.fragment.app.FragmentActivity, androidx.activity.ComponentActivity, p248j2.ActivityC3902g, android.app.Activity
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        ViewDataBinding d = DataBindingUtil.m11369d(this, R.layout.activity_settings);
        MutabilityOwnership.m3746l(d, "setContentView(this, R.layout.activity_settings)");
        C1124a.m10197Q(this, ((ActivitySettingsBinding) d).f22337r, R.string.settings);
        PixivAnalytics eVar = this.f18757A;
        MutabilityOwnership.m3746l(eVar, "pixivAnalytics");
        eVar.m6524f(AnalyticsScreenName.SETTING, null);
        BackStackRecord cVar = new BackStackRecord(m11131K0());
        cVar.m11165j(R.id.fragment_container, new SettingFragment());
        cVar.mo11171d();
    }

    @Subscribe
    public final void onEvent(ShowWebViewEvent showWebViewEvent) {
        MutabilityOwnership.m3745m(showWebViewEvent, "event");
        startActivity(WebViewActivity.m4684S0(this, showWebViewEvent.getUrl()));
    }

    @Override // androidx.activity.ComponentActivity, android.app.Activity
    public boolean onOptionsItemSelected(MenuItem menuItem) {
        MutabilityOwnership.m3745m(menuItem, "item");
        if (menuItem.getItemId() != 16908332) {
            return super.onOptionsItemSelected(menuItem);
        }
        this.f940i.m12030b();
        return true;
    }
}
